package vn.vfriends.games.service.impl;

import java.util.List;
import javax.inject.Inject;
import vn.vfriends.games.jpa.controller.NewsJpaController;
import vn.vfriends.games.jpa.entity.News;
import vn.vfriends.games.service.NewsService;

/**
 *
 * @author tuan@vfriends.vn
 */
public class NewsServiceImpl implements NewsService {

    @Inject private NewsJpaController newsController;
    
    @Override
    public void create(News news) throws Exception {
        newsController.create(news);
    }

    @Override
    public void edit(News news) throws Exception {
        newsController.edit(news);
    }

    @Override
    public void destroy(Long id) throws Exception {
        newsController.destroy(id);
    }

    @Override
    public List<News> findNews() {
        return newsController.findNews();
    }
    
    @Override
    public List<News> findDisplayNews() {
        return newsController.findDisplayNews();
    }

    @Override
    public News findNews(Long id) {
        return newsController.findNews(id);
    }

    @Override
    public int getNewsCount() {
        return newsController.getNewsCount();
    }

}
